#include "timer.h"

using namespace std;

void* timer_thread (void* timer_over)
{
	int writefd;
	string str = "nihao\n\r";
	
	if ( (writefd = open(FIFOPATH1, O_WRONLY)) < 0)
	{
		perror("write open failed!");
		pthread_exit(timer_over);
	}
	while (1) 
	{

		sleep(5);

		cout << "===========Line: " << __LINE__ << endl;
		write(writefd, str.c_str(), str.length());
		//close(writefd);
	}
}

